import request from '@/utils/request'

export function getroleemployee(params) {
  return request({
    url: '/sys/role',
    params
  })
    .then(res => ({
      rows: res.data.data.rows.map((item, i) => ({
        ...item,
        index: (params.page - 1) * 5 + i + 1
      })),
      total: res.data.data.total
    }))
    .catch(() => [])
}
